package shopsim.gui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;


public class ShopSettings extends JDialog {

	private final JPanel panelHintergrund = new JPanel();
	private JTextField textFieldStartMoney;

	public ShopSettings(String pName, Color pC, ImageIcon pI) {
		setResizable(false);
		setModal(true);
		setTitle(pName);
		setBounds(100, 100, 648, 578);
		getContentPane().setLayout(new BorderLayout());
		panelHintergrund.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(panelHintergrund, BorderLayout.CENTER);
		panelHintergrund.setLayout(null);
		panelHintergrund.setBackground(pC);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) {
						
					}
				});
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						dispose();
					}
				});
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
		
		JLabel labelBild = new JLabel(pI);
		labelBild.setBounds(452, 353, 170, 145);
		panelHintergrund.add(labelBild);
		
		JLabel lblStartguthaben = new JLabel("Startguthaben:");
		lblStartguthaben.setBounds(10, 51, 112, 14);
		panelHintergrund.add(lblStartguthaben);
		
		textFieldStartMoney = new JTextField();
		textFieldStartMoney.setBounds(132, 48, 120, 20);
		panelHintergrund.add(textFieldStartMoney);
		textFieldStartMoney.setColumns(10);
		
		JLabel labelEuro = new JLabel("\u20AC");
		labelEuro.setBounds(262, 51, 46, 14);
		panelHintergrund.add(labelEuro);
		
		
		setVisible(true);
	}
}
